package com.fengfeng.utils;

import static android.content.Context.MODE_PRIVATE;

import android.content.SharedPreferences;
import com.fengfeng.sdk.FengFengApplication;

/**
 * @author xiaoguokeng
 * @Date 2024/8/7
 */
public class FFDataUtils {
    public static void saveStringData(String key,String value){
        SharedPreferences sharedPreferences = FFApplicationUtils.mContext.getSharedPreferences("MyPrefs", MODE_PRIVATE);
        SharedPreferences.Editor editor = sharedPreferences.edit();
        editor.putString(key, value);
        editor.apply();
    }

    public static String getStringData(String key){
        SharedPreferences sharedPreferences = FFApplicationUtils.mContext.getSharedPreferences("MyPrefs", MODE_PRIVATE);
        String value = sharedPreferences.getString(key, "");
        return value;
    }
}
